import{d as V,a as i,o as t,b as r,w as s,e as n,m as x,f as m,E as h,t as c,W as g,F as z,c as k,U as b,q as y,K as R,D as B,p as w,_ as D}from"./index-c80Lh_is.js";import{A as N}from"./AppCollection-jlsv_00S.js";import{S as L}from"./StatusBadge-UNqSn95Q.js";import{S as E}from"./SummaryView-SP5kl4lM.js";const K=V({__name:"ZoneIngressListView",setup(T){return(Z,$)=>{const f=i("RouteTitle"),p=i("RouterLink"),v=i("KCard"),I=i("RouterView"),u=i("DataSource"),C=i("AppView"),A=i("RouteView");return t(),r(u,{src:"/me"},{default:s(({data:S})=>[S?(t(),r(A,{key:0,name:"zone-ingress-list-view",params:{zone:"",zoneIngress:""}},{default:s(({route:a,t:l})=>[n(C,null,{title:s(()=>[x("h2",null,[n(f,{title:l("zone-ingresses.routes.items.title")},null,8,["title"])])]),default:s(()=>[m(),n(u,{src:`/zone-cps/${a.params.zone}/ingresses?page=1&size=100`},{default:s(({data:o,error:d})=>[n(v,null,{default:s(()=>[d!==void 0?(t(),r(h,{key:0,error:d},null,8,["error"])):(t(),r(N,{key:1,class:"zone-ingress-collection","data-testid":"zone-ingress-collection",headers:[{label:"Name",key:"name"},{label:"Address",key:"socketAddress"},{label:"Advertised address",key:"advertisedSocketAddress"},{label:"Status",key:"status"},{label:"Details",key:"details",hideLabel:!0}],"page-number":1,"page-size":100,total:o==null?void 0:o.total,items:o==null?void 0:o.items,error:d,"empty-state-message":l("common.emptyState.message",{type:"Zone Ingresses"}),"empty-state-cta-to":l("zone-ingresses.href.docs"),"empty-state-cta-text":l("common.documentation"),"is-selected-row":e=>e.name===a.params.zoneIngress,onChange:a.update},{name:s(({row:e})=>[n(p,{to:{name:"zone-ingress-summary-view",params:{zone:a.params.zone,zoneIngress:e.name},query:{page:1,size:100}}},{default:s(()=>[m(c(e.name),1)]),_:2},1032,["to"])]),socketAddress:s(({row:e})=>[e.zoneIngress.socketAddress.length>0?(t(),r(g,{key:0,text:e.zoneIngress.socketAddress},null,8,["text"])):(t(),k(z,{key:1},[m(c(l("common.collection.none")),1)],64))]),advertisedSocketAddress:s(({row:e})=>[e.zoneIngress.advertisedSocketAddress.length>0?(t(),r(g,{key:0,text:e.zoneIngress.advertisedSocketAddress},null,8,["text"])):(t(),k(z,{key:1},[m(c(l("common.collection.none")),1)],64))]),status:s(({row:e})=>[n(L,{status:e.state},null,8,["status"])]),details:s(({row:e})=>[n(p,{class:"details-link","data-testid":"details-link",to:{name:"zone-ingress-detail-view",params:{zoneIngress:e.name}}},{default:s(()=>[m(c(l("common.collection.details_link"))+" ",1),n(y(b),{display:"inline-block",decorative:"",size:y(R)},null,8,["size"])]),_:2},1032,["to"])]),_:2},1032,["total","items","error","empty-state-message","empty-state-cta-to","empty-state-cta-text","is-selected-row","onChange"]))]),_:2},1024),m(),a.params.zoneIngress?(t(),r(I,{key:0},{default:s(e=>[n(E,{onClose:_=>a.replace({name:"zone-ingress-list-view",params:{zone:a.params.zone},query:{page:1,size:100}})},{default:s(()=>[(t(),r(B(e.Component),{"zone-ingress-overview":o==null?void 0:o.items.find(_=>_.name===a.params.zoneIngress)},null,8,["zone-ingress-overview"]))]),_:2},1032,["onClose"])]),_:2},1024)):w("",!0)]),_:2},1032,["src"])]),_:2},1024)]),_:1},8,["params"])):w("",!0)]),_:1})}}}),O=D(K,[["__scopeId","data-v-a834c201"]]);export{O as default};
